#include <vector>
using namespace std;
class Solution{
    public:
        vector<int> twoSum(vector<int> &nums, int target);
};

vector<int> Solution::twoSum(vector<int> &nums, int target)
{
    vector<int> result(2);
    int len = nums.size();
    for (int i = 0; i < len; i++)
    {
        for (int j = i + 1; j < len; j++)
        {
            if (nums[i] + nums[j] - target == 0)
            {
                result[0] = i;
                result[1] = j;
                goto exit_tip;
            }
        }
    }
    exit_tip:
    return result;
}